﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Joyintech.Model.inpiao365;
using Joyintech.BLL.inpiao365;
using Joyintech.Common;

namespace Joyintech.Web.inpiao365.UserCenter
{
    public partial class MyUser_Charge_Login : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (customer_BLL.GetInstance().GetCurrentCustomer() == null)
            {
                Response.Redirect("UserLogin.aspx");
            }
        }
        /// <summary>
        /// 修改密码操作
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
        {
            customer customer = customer_BLL.GetInstance().GetCurrentCustomer();
            if (customer.CustomerPass == Utils.MD5(this.txt_pwd.Text.Trim()))
            {
                
                customer.CustomerPass = Utils.MD5(txt_renewpwd.Text.Trim());
               
                customer_BLL bll = new customer_BLL();
                int result = bll.UpdateAutoCheck(customer);
                if (result > 0)
                {

                }
                else
                {

                }
            }
            else
            {

            }


        }
    }
}